Added in a login funciton to be used as a template