made changes for login required
fixed minor details
Merge pull request #6 from Cheekio/Fixing-login_required_userprofile/views.py

made changes for login required