added status handling
finished logout functionality