Modified login, using layout xml instead of observers