Refactoring loginbinding