switched user authentication to a view