added a better way to track users logging in