simulating login functionality