added check for authentication
corrected redirect
changed to go to auth page
added auth check
test
test
working version