added login things to controller