filled out login logic. basic template inheritance