Added logout anf fixed small issues