Moved code to layout. Added logout function. Started user profile