Viewing /accounts/profile without username when not logged into redirect to login page instead of crashing with 500 error