User login and login tracking using PHP