Proper error message handling. Checking isAutheticated session.