(bug) authentication works when loggedIn is null