added login support for app key