Controller and action added to check credentials