Implement user authentication
Fix heroku-specific redirect loop