I experienced the same problem but I managed to solve it by modifying the init.php under gallery directory as below.
if (isset($_USER["username"])) {
$gallery->session->username = $_USER['username'];
} else if (!empty($gallery->session->username)) {
$gallery->session->username = "";
}
The first two lines are already there which is about line 200, I think.
---
sagnaing;