login functionality
fixed trigger bug