added login based on namespaces