logout working and db checks working