Fix bug with undeclared variable and improve login screen