added basic authentication related logic in views