modificata logica loginactivity