Added login and logout. Fixed alerts.