Added missing break
Changed return type
Variable cleanup
Added check for anonymous user, redirect to frontpage with fragment