login and bugfix