redirecting to login.php if user is not logged in