commit login functionality