fixing login to be more dynamic