updated localStorage and logout functionality

implemented functionality