Adds log in functionality