Login bug fixing