added admin log in and log out
changed hook to prevent users from accessing others pages