Implementing auth

@azharkhan 
Please review
we should use named URL's instead of direct links, but that's a refactor for another day.