both login and register works purfectly