Fix comments and added error message when not logged in