Added login loading status and logout feature