Fixed Auth Issues and added logout feature