restore functionality
add logout function