Applies the security for login system